	
;;; QQ: 67762207
[@main]
#IF
checkhum E007
#ACT
mov D1% P9
#ELSEACT
mov D1 0

#IF
#ACT
loadvalue D0 <PlayerParam\PK tournament record.ini> [state] [state]

#IF
EQUAL D0 0
#ACT
mov A0 "venue free of"

#IF
EQUAL D0 1
#ACT
mov A0 "have not yet applied challenge to object"

#IF
EQUAL D0 2
#ACT
mov A0 "challenge has applied for and wait for the other responses"

#IF
EQUAL D0 3
#ACT
mov A0 "the two sides is about to begin Battle"

#IF
EQUAL D0 4
#ACT
mov A0 "Both sides are PK-China"

#IF
EQUAL D0 5
#ACT
mov A0 "contest has ended, the venue will close"


#IF
#SAY
Welcome to PK challenges in the market. 5 points for each venue costs, borne by the sponsor. \
Minimum bet amount of volumes 10 points, both sides must wager. \ \
Venues instructions: \
To enter the venue at the beginning of PK tournament players have 5 minutes before the time for processing applications. \
PK referee with the battlefield to engage in dialogue. Enter the bet amount and the name opponent. \
When the two sides are to meet the conditions of volume points, and the other the challenge with a successful challenge. \
Challenge each other's games have been introduced into the challenges of preparation time, 5 minutes after the start of the match. \
The preparation time from entry into the challenge of starting any one off the assembly line, dropped calls, \
Death was determined as a challenge to fail. The other party for the winning side, \
10% of the fee to be collected, the winning party won the remaining two sides of the bet. \
Race time was 10 minutes, overtime will be charged 10% of all bets for the fee, \
The return of the remaining two points of their respective volumes, forced an end game. \ \
Watch the battle fails to collect any fees. \
Watch the battle in the venue can not use any skills and moving objects. \ \
(FCOLOR/1) venues now have <$OUTPUT(D1)> person (FCOLOR/12) \
Venue Status: (FCOLOR/10) <$OUTPUT(A0)> (FCOLOR/12) \ \
<Into the PK Venues/@EnterPKPlace> \
<Watch the battle/@EnterPK> \ \
#IF
Isadmin
#SAY
<Initialization/@initialization PK>


[@Initialization PK]
#ACT
actcmd delfile <enviR\PlayerParam\PK tournament record. ini>
mapting E007 1 405 117
SetAreaAttr <E007, 40,40,200> <SAFE>
sysmsg "Initialization completed"

[@EnterPK]
#ACT
loadvalue D0 <PlayerParam\PK tournament record.ini> [state] [state]
#IF
ELARGE D0 1
#ACT
mapmove E007 22 34
#ELSESAY
Sorry, still no one to challenge, you can not watch the battle. \
<Close/@exit>

[@EnterPKPlace]
#IF
#ACT
loadvalue D0 <PlayerParam\PK tournament record.ini> [state] [state]

#IF
EQUAL D0 0
#ELSESAY
Sorry, have people go into the stadium.
#ELSEACT
break

#IF
checkcmd checkuserjf 5
#ACT
actcmd setuserjf - 5 PK match fee
SetAreaAttr <E007, 40,40,200> <SAFE>
ChangeMapAttr <E007> <NoSpell>
Delaygoto [grobal] 300 @Entercheck
mapmove E007, 40,40
savevalue <PlayerParam\PK tournament record.ini> [Users] [the applicant]% USERNAME
savevalue <PlayerParam\PK tournament record.ini> [state] [state] 1
#ELSEACT
break
#ELSESAY
Sorry, your points less than 5 points. \




[@Entercheck]
#IF
#ACT
loadvalue D0 <PlayerParam\PK tournament record.ini> [state] [state]

#IF
SMALL D0 3
#ACT
actcmd delfile <envir \ PlayerParam \ PK tournament record. ini>
mapting E007 1 405 117
SetAreaAttr <E007, 40,40,200> <SAFE>



;;; QQ: 67762207